package me.luger.project.fof.entity;


import me.luger.core.commom.util.DateUtil;
import me.luger.core.dao.nutz.entity.BaseEntity;
import org.nutz.dao.entity.annotation.*;
import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.Date;

@Table("fund_nav")
public class FundNav extends BaseEntity implements Serializable,Cloneable{
private static final long serialVersionUID=1L;


    /**
     * 基金外部编号
     */
    @Column("fund_ext_code")
    @Comment("基金外部编号")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    @Name
    private String fundExtCode;
    /**
     * 外部数据源，0表示万得，1表示朝阳永续
     */
    @Column("fund_ext_source")
    @Comment("外部数据源，0表示万得，1表示朝阳永续")
    @ColDefine(type = ColType.INT, width = 3)
    private Integer fundExtSource;
    /**
     * 基金名称
     */
    @Column("fund_name")
    @Comment("基金名称")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String fundName;
    /**
     * 单位净值(元)
     */
    @Column("nav")
    @Comment("单位净值(元)")
    @ColDefine(customType = "DECIMAL", width = 38)
    private Double nav;
    /**
     * 累计净值(元)
     */
    @Column("added_nav")
    @Comment("累计净值(元)")
    @ColDefine(customType = "DECIMAL", width = 38)
    private Double addedNav;
    /**
     * 复权累计净值(按分红再投推算)
     */
    @Column("swanav")
    @Comment("复权累计净值(按分红再投推算)")
    @ColDefine(customType = "DECIMAL", width = 38)
    private Double swanav;
    /**
     * 复权因子
     */
    @Column("pc")
    @Comment("复权因子")
    @ColDefine(customType = "DECIMAL", width = 38)
    private Double pc;
    /**
     * 复权系数
     */
    @Column("cpc")
    @Comment("复权系数")
    @ColDefine(customType = "DECIMAL", width = 38)
    private Double cpc;
    /**
     * 净值日期
     */
    @Column("statistic_date")
    @Comment("净值日期")
    @ColDefine(type = ColType.DATETIME, width = 19)
    @JSONField (format="yyyy-MM-dd")
    private Date statisticDate;


    public void setFundExtCode(String fundExtCode){
        this.fundExtCode=fundExtCode;
    }
    public String getFundExtCode(){
        return this.fundExtCode;
    }

    public void setFundExtSource(Integer fundExtSource){
        this.fundExtSource=fundExtSource;
    }
    public Integer getFundExtSource(){
        return this.fundExtSource;
    }

    public void setFundName(String fundName){
        this.fundName=fundName;
    }
    public String getFundName(){
        return this.fundName;
    }

    public void setNav(Double nav){
        this.nav=nav;
    }
    public Double getNav(){
        return this.nav;
    }

    public void setAddedNav(Double addedNav){
        this.addedNav=addedNav;
    }
    public Double getAddedNav(){
        return this.addedNav;
    }

    public void setSwanav(Double swanav){
        this.swanav=swanav;
    }
    public Double getSwanav(){
        return this.swanav;
    }

    public void setPc(Double pc){
        this.pc=pc;
    }
    public Double getPc(){
        return this.pc;
    }

    public void setCpc(Double cpc){
        this.cpc=cpc;
    }
    public Double getCpc(){
        return this.cpc;
    }

    public void setStatisticDate(Date statisticDate){
        this.statisticDate=statisticDate;
    }
    public Date getStatisticDate(){
        return this.statisticDate;
    }

    public String statisticDateStr(){
        if(null == this.statisticDate){
            return "";
        }
        return DateUtil.format(this.statisticDate,DateUtil.DATE_YYYY_MM_DD);
    }

}